import pymongo
from pymongo.collection import Collection#更容易区mongo里的数据表
class Connect_mongo(object):
    def __init__(self):
        self.client=pymongo.MongoClient("mongodb://user_spider:pq888888@192.168.101.199:27017/?authSource=spider")
        self.db_data=self.client['spider']
    def insert_item(self,item):
        db_collection=Collection(self.db_data,'dou_guo_mei_shi_items_inorder')
        db_collection.insert_one(item)
mongo_info=Connect_mongo()
